<template>
  <div class="topdashboard">
    <!-- <h2>待审核</h2> -->
    <div class="centermsg waitAssign">
      <p><i class="round"></i>待分配</p>
      <router-link :to="{ path: '/potenCus/customer/potenCusManage/index', query: { clueStatus: 70001001 } }">{{ rowData.waitAssign }}</router-link>
    </div>
    <div class="centermsg invalidCount"  v-if="roleList.NetSalesManager">
      <p><i class="round"></i>无效申请</p>
      <router-link :to="{ path: '/potenCus/customer/approval/index' }">{{ rowData.invalidCount }}</router-link>
    </div>
    <div class="centermsg failCount">
      <!--//cms注意  潜客战败改为“战败申请” -->
      <p><i class="round"></i>战败申请</p>
      <router-link :to="{ path: '/potenCus/customer/approval/index', query: { active: 1 } }">{{ rowData.failCount }}</router-link>
    </div>
     <!--//cms注意 两个模块不要了 -->
    <!-- <div class="centermsg orderNum"  v-if="roleList.ShowroomManager">
      <p><i class="round"></i>客户订单</p>
      <router-link :to="{ path: '/retail/salesmanage/managerverify/index' }">{{ rowData.orderNum }}</router-link>
    </div>
    <div class="centermsg baseCount"  v-if="roleList.ShowroomManager">
      <p><i class="round"></i>失效基盘</p>
      <router-link :to="{ path: '/potenCus/basePlate/basePlateFail/index' }">{{ rowData.baseCount }}</router-link>
    </div> -->
  </div>
</template>

<script>
import Chart1 from '@/charts/preSale/chart1';
export default {
  name: 'top',
  components: {
    Chart1
  },
  props: {
    rowData: {
      type: Object,
      default: () => ({})
    },
    roleList: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      option1: this.createOption1(),
    };
  },
  computed: {
  },
  mounted() {
  },
  methods: {
    createOption1(){
      return {
        series: [
          {
            name:'访问来源',
            type:'pie',
            radius: ['50%', '70%'],
            avoidLabelOverlap: false,
            label: {
              normal: {
                show: false,
                position: 'center'
              },
              emphasis: {
                show: true,
                textStyle: {
                  fontSize: '12',
                }
              }
            },
            labelLine: {
              normal: {
                show: false
              }
            },
            data:[
              {value:3, name:'3'},
              {value:6, name:'6'}
            ]
          }
        ],
        color:['#FF4D4F', '#00040A'],
      }
    },
    closeDialog() {
      this.$emit('close', false);
    },
    resize(){
      this.$refs.Chart1.resize()
    }
  }
};
</script>

<style lang="less" scoped>
.topdashboard{
  min-height: 197px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .centermsg{
    // width: 100%;
    min-height: 33px;
    flex: 1;
    line-height: 33px;
    font-size: 14px;
    font-weight: 400;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:#FFF;
    border-radius: 2px;
    margin-bottom: 8px;
    padding: 0 20px;
    &:hover{
      box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
    }
    p{
      display: flex;
      align-items: center;
      i{
        display: block;
        width:8px;
        height:8px;
        border-radius: 50%;
        margin-right: 10px;
      }
    }
    &.waitAssign{
      span,a{color: #FF4D4F;}
      i{background: #FF4D4F;}
    }
    &.invalidCount{
      span,a{color: #FFC53D;}
      i{background: #FFC53D;}
    }
    &.failCount{
      span,a{color: #36CFC9;}
      i{background: #36CFC9;}
    }
    &.orderNum{
      span,a{color: #2089F9;}
      i{background: #2089F9;}
    }
    &.baseCount{
      margin-bottom: 0;
      span,a{color: #6940E9;}
      i{background: #6940E9;}
    }
  }

}
</style>

